package cc.rengu.igas.bsps.common.enums;
/*
 *Create by zhangxuran on 2020-04-16
 */

public enum LimitAcctTypeEnum {
    BANK_DEBIT("00", "本行借记账户"),
    BANK_CREDIT("01", "本行贷记账户"),
    BANK_PASSBOOK("02", "本行存折"),
    BANK_ACCT("03", "本行内部户"),
    OTHER_DEBIT("10", "他行借记账户"),
    OTHER_CREDIT("11", "他行贷记账户"),
    OTHER_PASSBOOK("12", "他行存折"),
    OTHER_ACCT("13", "他行内部户"),
    TOTAL_DEBIT("20", "借记账户(包括本行、他行借记账户)"),
    TOTAL_CREDIT("21", "贷记账户(包括本行、他行贷记账户)"),
    ALL("*", "通用账户");

    private String limitAcctType;
    private String limitAcctDesc;

    LimitAcctTypeEnum(String limitAcctType, String limitAcctDesc) {
        this.limitAcctType = limitAcctType;
        this.limitAcctDesc = limitAcctDesc;
    }

    public String getLimitAcctType() {
        return limitAcctType;
    }

    public void setLimitAcctType(String limitAcctType) {
        this.limitAcctType = limitAcctType;
    }

    public String getLimitAcctDesc() {
        return limitAcctDesc;
    }

    public void setLimitAcctDesc(String limitAcctDesc) {
        this.limitAcctDesc = limitAcctDesc;
    }

    /**
     * 根据账户类型获取账户类型描述
     *
     * @param limitAcctType 账户类型
     * @return 账户类型描述
     */
    public static String getLimitAcctTypeDesc(String limitAcctType) {
        for (LimitAcctTypeEnum limitAcctTypeEnum : LimitAcctTypeEnum.values()) {
            if (limitAcctTypeEnum.getLimitAcctType().equals(limitAcctType)) {
                return limitAcctTypeEnum.getLimitAcctDesc();
            }
        }
        return null;
    }
}
